﻿@{
    Layout = null;
    List<LeEdu.MODEL.Lable> Model = ViewBag.st;
}

<!DOCTYPE html>

<html>
<!-- 网页头部分布视图 -->
@Html.Partial("~/Views/Shared/HouTai_Header.cshtml")
<body>
    <!-- 网页导航菜单分布视图 -->
    @Html.Partial("~/Views/Shared/HouTai_DaoHang.cshtml")

    <div class="container">
        <div class="row">
            <!-- 网页左侧菜单分布视图 -->
            @Html.Partial("~/Views/Shared/HouTai_Left_Menu_Course.cshtml")
            <div class="col-md-10">
                <div class="page-header clearfix">
                    <h1 class="pull-left">标签管理</h1>
                    <div class="pull-right">
                        <a class="btn btn-success btn-sm" data-url="/admin/tag/create" data-toggle="modal" data-target="#exampleModal">新增标签</a>

                    </div>
                </div>






                <table id="tag-table" class="table table-striped">


                    <tr>
                        <th width="10%">ID</th>
                        <th width="60%">名称</th>
                        <th width="20%">添加时间</th>
                        <th width="10%">操作</th>
                    </tr>
                    @foreach (var item in Model)
                    {
                        <tbody>
                            <tr id="tag-tr-9">
                                <td>@item.LableId</td>
                                <td>@item.LableName</td>
                                <td>@DateTime.Now</td>
                                <td>

                                    <a class="btn btn-default btn-sm" data-toggle="modal" data-target="#modal" href="/Course/tagEdite/@item.LableId" data-url="/Course/tagEdite/@item.LableId">编辑</a>
                                    @*<button class="btn btn-default btn-sm" data-url="/Course/tagEdite" data-toggle="modal" data-target="#modal">编辑</button>*@

                                </td>
                            </tr>

                        </tbody>
                    }

                </table>



            </div>
        </div>
    </div>

    @*<script>
        var app = {};
        app.debug = false;
        app.version = '6.9.3';
        app.httpHost = 'http://www.zhishile.com';
        app.basePath = '';
        app.theme = 'jianmo';
        app.themeGlobalScript = 'theme/global-script';
        app.jsPaths = {"common":"common","theme":"\/themes\/jianmo\/js","customwebbundle":"\/bundles\/customweb\/js","customadminbundle":"\/bundles\/customadmin\/js","topxiawebbundle":"\/bundles\/topxiaweb\/js","topxiaadminbundle":"\/bundles\/topxiaadmin\/js","classroombundle":"\/bundles\/classroom\/js"};

        app.crontab = '/common/crontab';

        var CKEDITOR_BASEPATH = app.basePath + '/assets/libs/ckeditor/4.6.7/';

        app.config = {"api":{"weibo":{"key":""},"qq":{"key":""},"douban":{"key":""},"renren":{"key":""}},"cloud":{"video_player":"http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/GrindPlayer.swf","video_player_watermark_plugin":"http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Watermake-1.0.3.swf","video_player_fingerprint_plugin":"http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Fingerprint-1.0.1.swf"},"loading_img_path":"\/assets\/img\/default\/loading.gif?6.9.3"};

        app.arguments = {};
            app.controller = 'tag/list';

        app.scripts = null;

        app.uploadUrl = '/file/upload';
        app.imgCropUrl = '/file/img/crop';
        app.lessonCopyEnabled = '0';

        app.mainScript = '/bundles/topxiaadmin/js/admin-app.js?6.9.3';
          </script>*@
    @*<script src="/assets/libs/seajs/seajs/2.2.1/sea.js?6.9.3"></script>
        <script src="/assets/libs/seajs/seajs-style/1.0.2/seajs-style.js?6.9.3"></script>
        <script src="/assets/libs/seajs-global-config.js?6.9.3"></script>
        <script>*@
    @*seajs.use(app.mainScript);
        </script>  <div id="modal" class="modal"></div>*@
    <div class="fixed-bar">
        <a href="/admin/feedback" target="_blank" class="icon-question-text feedback">
            <i class="es-icon es-icon-help"></i>
            <span>产品<br>反馈</span>
        </a>
    </div>





    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="exampleModalLabel"> 添加标签 </h4>
                </div>
                <form action="/Course/tagAdd" method="post">
                    <div class="modal-body">

                        <div class="form-group">
                            <label>标签名称</label>
                            <input type="text" class="form-control" name="LableName" id="recipient-name">
                        </div>


                    </div>
                    <div class="modal-footer">
                        <input type="submit" class="btn btn-primary" value="添加">
                        @*<button type="button" class="btn btn-primary">Send message</button>*@
                    </div>
                </form>

            </div>
        </div>
    </div>



    <div class="modal fade" id="modal" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <!-- /.modal -->
                 
            </div>

        </div>
    </div>
    @*模态框传值问题（加载一次模态框 清除一下以前的数据  不然数据不变*@
    <script>
        $("#myModal").on("hidden.bs.modal", function () {
            $(this).removeData("bs.modal");
        })
    </script>

</body>

</html>
